package SingletonPattern.example;

public class Main {
    public static void main(String[] args) {
        Singleton obj1 = Singleton.getInstance();//静态的方法
        Singleton obj2 = Singleton.getInstance();
        if (obj1 == obj2) {
            System.out.println("obj1 == obj2");
        }
        else{
            System.out.println("obj1 != obj2");
        }
    }
}
